#!/bin/bash

zimage_path=linux-5.19.17/out_vexpress/arch/arm/boot/zImage
dtb_path=linux-5.19.17/out_vexpress/arch/arm/boot/dts/vexpress-v2p-ca9.dtb
# rootfs_path=u18-rootfs.ext4
rootfs_path=busybox-rootfs.ext4

qemu-system-arm \
    -M vexpress-a9 \
    -m 512M \
    -serial mon:stdio \
    -kernel ${zimage_path} \
    -dtb ${dtb_path} \
    -sd ${rootfs_path} \
    -append "console=ttyAMA0 root=/dev/mmcblk0 rw"
